import request from '@/utils/request'

export default {
  login(user) {
    return request({
      url: '/weddingindex/user/login',
      method: 'post',
      data: user
    })
  },

  register(user) {
    return request({
      url: '/weddingindex/user/register',
      method: 'post',
      data: user
    })
  },

  getUserById(id) {
    return request({
      url: `/weddingadmin/user/getUserById/${id}`,
      method: 'GET',
    })
  },

  updateUser(user) {
    return request({
      url: '/weddingindex/user/update',
      method: 'post',
      data: user
    })
  },

  verifyPassword(user) {
    return request({
      url: '/weddingindex/user/verifyPassword',
      method: 'post',
      data: user
    })
  },

  updatePassword(user) {
    return request({
      url: '/weddingindex/user/updatePassword',
      method: 'post',
      data: user
    })
  },
  joinNumAdd(id) {
    return request({
      url: `/weddingindex/user/JoinNumAdd/${id}`,
      method: 'GET'
    })
  }
}
